package com.nanbei.crmService.controller;

import com.nanbei.commonUntil.R;

import com.nanbei.crmService.entity.CrmBanner;
import com.nanbei.crmService.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/crmBanner/userBanner")
@CrossOrigin
public class CrmUserController {

    @Autowired
    private CrmBannerService crmBannerService;

    /**
     * 查询所有轮播图
     * @return
     */
    @GetMapping("/findAllBanner")
    public R findAllBanner(){
        List<CrmBanner> crmBannerList =  crmBannerService.findAllBanner();
        return R.ok().data("crmBannerList",crmBannerList);
    }
}
